docs(onboarding): sync KYC/customer examples with schema#502
Conversation
- POST /beneficial-owners: roles[] array + nested personalInfo
(was singular role + flat fullName)
- POST /documents: documentHolder + country required
(was customerId/beneficialOwnerId form fields)
- Webhook types use OBJECT.EVENT dot-notation:
CUSTOMER.KYC_APPROVED, INVITATION.CLAIMED
(no invented KYC_STATUS, MANUALLY_* or KYC_SUBMITTED values)
- KycStatus terminal set: UNVERIFIED|PENDING|APPROVED|REJECTED only
- Bulk CSV columns match customers_bulk_csv.yaml
(removed bank-account columns - those go via /customers/external-accounts)
- Bulk job-status uses id + flat {correlationId, code, message} errors
- Business customer PATCH/create uses businessInfo.{legalName, taxId}
(was top-level)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@greptile review |
Greptile SummaryThis PR syncs eleven onboarding/KYC documentation files with the current OpenAPI schema, correcting invented webhook event names, deprecated field shapes, and stale enum values across all four product verticals (global-p2p, payouts-and-b2b, ramps, rewards).
Confidence Score: 4/5Safe to merge with one prose fix in the KYB document upload step before publishing. The KYB 'Upload supporting documents' step in kyc-unregulated.mdx still describes the old customerId and beneficialOwnerId form fields in its prose, while the code example below it already uses documentHolder. A developer following the text description will pass the wrong field names to the API. Everything else — event types, payload shapes, enum values, CSV schema — is cleanly updated. mintlify/snippets/kyc/kyc-unregulated.mdx — the KYB document upload prose (around line 257) uses stale form field names that contradict the corrected code example.
|
| Filename | Overview |
|---|---|
| mintlify/snippets/kyc/kyc-webhooks.mdx | Added KYB cases (KYB_APPROVED, KYB_REJECTED, KYB_PENDING) to the example handler; corrected event type enum and replaced stale 'Only final states' code comment — previous review concerns fully addressed. |
| mintlify/snippets/kyc/kyc-unregulated.mdx | Webhook event types, kycStatus enum, beneficial-owner payload, and document upload form field corrected; prose in the KYB 'Upload supporting documents' step still uses stale field names (customerId / beneficialOwnerId) that conflict with the new documentHolder field in the code example. |
| mintlify/snippets/creating-customers/customers.mdx | Webhook types, payload shape, bulk CSV columns, and job-status schema all updated correctly; sample error message ('Invalid bank account number') is inconsistent with the removal of bank-account columns from the bulk CSV. |
| mintlify/global-p2p/onboarding/configuring-customers.mdx | Bulk CSV columns corrected, bank-account columns removed, job-status schema updated to id/correlationId/code/message; sample error message still references 'bank account number' which is removed from the CSV schema. |
| mintlify/payouts-and-b2b/onboarding/configuring-customers.mdx | PATCH example updated to use customerType/currencies/address, bank-account columns removed from bulk CSV, job-status schema corrected; same stale 'bank account number' error message remains in the job-status example. |
| mintlify/global-p2p/onboarding/invitations.mdx | INVITATION_CLAIMED renamed to INVITATION.CLAIMED throughout; webhook payload restructured with top-level id/type/timestamp/data — clean, no issues. |
| mintlify/ramps/platform-tools/webhooks.mdx | KYC_STATUS tab replaced with CUSTOMER.KYC_* tab showing updated webhook envelope (id/type/data) and noting KYB_* siblings — accurate and well-structured. |
| mintlify/ramps/onboarding/configuring-customers.mdx | Business customer required fields updated from top-level businessName/taxId to businessInfo.legalName/taxId nesting — correct schema alignment. |
| mintlify/rewards/onboarding/configuring-customers.mdx | Typo 'Hanlding KYC/KYC' corrected to 'Handling KYC/KYB'; new query filter params (region, currency, umaAddress) added — clean changes. |
| mintlify/payouts-and-b2b/quickstart.mdx | KYC_STATUS replaced with CUSTOMER.KYC_APPROVED/KYC_REJECTED with KYB_* mention — accurate correction. |
| mintlify/snippets/creating-customers/onboarding-model.mdx | KYC_STATUS replaced with the correct CUSTOMER.KYC_/KYB_ event types including PENDING; change is accurate and consistent with the rest of the PR. |
Sequence Diagram
sequenceDiagram
participant P as Platform
participant G as Grid API
participant W as Webhook Endpoint
P->>G: POST /customers (customerType + info)
G-->>P: "{ id, kycStatus: PENDING }"
alt Hosted flow
P->>G: "POST /customers/{id}/kyc-link"
G-->>P: "{ kycUrl, token, expiresAt }"
P->>P: Redirect customer to kycUrl
else Direct API (KYC)
P->>G: POST /documents (documentHolder, country, file)
P->>G: "POST /verifications { customerId }"
else Direct API (KYB)
P->>G: POST /beneficial-owners (roles[], personalInfo)
P->>G: POST /documents (documentHolder, country, file)
P->>G: "POST /verifications { customerId }"
end
G->>W: CUSTOMER.KYC_PENDING (intermediate)
G->>W: CUSTOMER.KYC_APPROVED or CUSTOMER.KYC_REJECTED (terminal)
Note over G,W: Business customers emit KYB_* siblings
W->>P: Activate or reject customer
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
mintlify/snippets/kyc/kyc-unregulated.mdx:257
**Stale field names in KYB document upload prose**
This sentence still refers to `customerId` and `beneficialOwnerId` as the form fields to use, but this PR changed both to the unified `documentHolder` field. A developer reading this description will attempt `-F "customerId=..."` and `-F "beneficialOwnerId=..."`, which no longer match the API — the code example immediately below uses `-F "documentHolder=..."` for the beneficial owner case, while the business customer case (referencing a `Customer:...` ID) isn't shown at all for KYB. The prose and code examples are now in direct conflict.
### Issue 2 of 2
mintlify/snippets/creating-customers/customers.mdx:311-312
**Stale error example references removed bank-account concept**
The sample error message says "Invalid bank account number" but this PR explicitly removed all bank-account columns from the bulk CSV format with the note that bank accounts are now managed separately via `/customers/external-accounts`. Using a bank-account error as the illustrative example in the same block that just removed bank-account columns will confuse developers who expect a representative error for the new schema. The same stale example appears in `global-p2p/onboarding/configuring-customers.mdx` and `payouts-and-b2b/onboarding/configuring-customers.mdx`.
Reviews (4): Last reviewed commit: "add KYB_* cases to webhook handler examp..." | Re-trigger Greptile
PENDING fires when a customer is submitted for review; APPROVED and REJECTED are the terminal decisions. The webhook handler example and narrative now distinguish the two roles instead of bundling them. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@greptile review |
The example webhook handler in kyc-webhooks.mdx now branches on the KYB_APPROVED / KYB_REJECTED / KYB_PENDING events as well, so business customer events aren't silently logged. In kyc-unregulated.mdx, the KYB tab's "Track the decision" step now recommends KYB_APPROVED / KYB_REJECTED (and the KYB_PENDING intermediate) instead of the individual KYC_* siblings, since the KYC_* events don't fire for business customers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@greptile review |
Comprehensive sync of onboarding/KYC documentation examples with the current OpenAPI schema.
Changes
POST /beneficial-owners— now usesroles[]array + nestedpersonalInfo(was singularrole+ flatfullName).POST /documents— body usesdocumentHolder+country(was form fields likecustomerId=/beneficialOwnerId=).Webhook event types — corrected to the schema's
OBJECT.EVENTdot-notation:CUSTOMER.KYC_APPROVED/CUSTOMER.KYC_REJECTED(andKYB_*siblings) — was the inventedKYC_STATUSINVITATION.CLAIMED— was the inventedINVITATION_CLAIMEDCUSTOMER.KYC_SUBMITTEDandCUSTOMER.KYC_MANUALLY_*types entirelykycStatusenum — terminal set isUNVERIFIED | PENDING | APPROVED | REJECTEDonly; docs that listedEXPIRED/CANCELED/MANUALLY_*corrected.Bulk CSV import — columns match
customers_bulk_csv.yaml; removed bank-account columns (bank accounts are added separately via/customers/external-accounts).Bulk job-status response — uses
id+ flat{correlationId, code, message, details}error entries perBulkCustomerImportErrorEntry.Business customer create/PATCH — uses
businessInfo.{legalName, taxId}(was top-levelbusinessName/taxId).Sibling PRs
Split from a larger sync effort. Two companion draft PRs cover payments and accounts/auth/cards.
🤖 Generated with Claude Code